Skip to content

Conversation

murfel
Copy link
Contributor

@murfel murfel commented Aug 20, 2025

@murfel murfel requested a review from fzhinkin August 20, 2025 13:53
@murfel murfel changed the base branch from master to develop August 20, 2025 13:53
@murfel
Copy link
Contributor Author

murfel commented Aug 20, 2025

@turansky PTAL!

@turansky
Copy link
Contributor

LGTM!

@murfel
Copy link
Contributor Author

murfel commented Aug 27, 2025

Comment on lines +24 to +27
// https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-browser/src/webMain/generated/web/errors/reportError.kt
if (globalThis.reportError != null) {
// Modern browsers, Deno, Bun, etc.
globalThis.reportError(jsException)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, we can only rely on reportError once your change in kotlin-wrappers is commited to master? So this PR is dependant on your merge.

https://github.com/JetBrains/kotlin-wrappers/blob/3d7419234a45f7f8a31ea9274f6909ecd63734c6/kotlin-browser/src/webMain/generated/web/errors/reportError.kt

# Change log for kotlinx.coroutines

## Version 1.10.3
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think mentioning that it still only prints to console in browser is not needed, since it, in fact, now throws in browser, only the browser chooses to log it into console.

Also, the logged exception message in browser may change, as it will now be formatted by the browser's preference, rather than by us.

# Change log for kotlinx.coroutines

## Version 1.10.3
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be annotated as Breaking changes / Behavior change

# Change log for kotlinx.coroutines

## Version 1.10.3
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only update changelogs as part of the release procedure: https://github.com/Kotlin/kotlinx.coroutines/blob/master/RELEASE.md This way, several changes can be combined and described in bulk or undo one another.


internal actual fun propagateExceptionFinalResort(exception: Throwable) {
val jsException = exception.toJsException()
// https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-browser/src/webMain/generated/web/errors/reportError.kt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using commit hashes instead of branch names can make such links more reliable. I wanted to say "this link could start returning 404 tomorrow", but in fact, it returns 404 for me today!

@dkhalanskyjb dkhalanskyjb self-requested a review September 8, 2025 11:15
@murfel murfel removed the request for review from fzhinkin September 12, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants